Skip to content

Updated Endpoint Selector to pick the Cluster in Enabled state (in addition to Host state) #10757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: 4.20
Choose a base branch
from

Conversation

sureshanaparti
Copy link
Contributor

@sureshanaparti sureshanaparti commented Apr 21, 2025

Description

Current EndPoint selection checks for Host status Up and and resource_state Enabled, however there is a case where whole Cluster (where Host located is) can be disabled. This PR updates the EndPoint selection query to consider the clusters with allocation state 'Enabled' (in addition to current Host state check - status Up and and resource_state Enabled), which ensures the Host is chosen from Enabled cluster.

This includes changes of PR #10777 (targeted for 4.19.3).

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@sureshanaparti sureshanaparti added this to the 4.20.1 milestone Apr 21, 2025
@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link

codecov bot commented Apr 21, 2025

Codecov Report

Attention: Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.

Project coverage is 16.14%. Comparing base (0af887b) to head (89fe76e).
Report is 52 commits behind head on 4.20.

Files with missing lines Patch % Lines
...e/cloudstack/storage/volume/VolumeServiceImpl.java 0.00% 11 Missing ⚠️
...e/driver/CloudStackPrimaryDataStoreDriverImpl.java 0.00% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #10757      +/-   ##
============================================
+ Coverage     16.02%   16.14%   +0.11%     
- Complexity    13127    13228     +101     
============================================
  Files          5652     5652              
  Lines        495994   496986     +992     
  Branches      60067    60218     +151     
============================================
+ Hits          79466    80214     +748     
- Misses       407668   407838     +170     
- Partials       8860     8934      +74     
Flag Coverage Δ
uitests 4.00% <ø> (+<0.01%) ⬆️
unittests 16.99% <0.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sureshanaparti sureshanaparti changed the title Updated Endpoint Selector to pick the Cluster in Enabled state (in addition to Host state) [WIP] Updated Endpoint Selector to pick the Cluster in Enabled state (in addition to Host state) Apr 21, 2025
@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13121

@borisstoyanov
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@borisstoyanov a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13082)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 54961 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10757-t13082-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@weizhouapache
Copy link
Member

code lgtm

pod could be disabled as well.
it might be better to check if pod state is checked during resource allocation, etc

Copy link
Member

@rohityadavcloud rohityadavcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM didn't test it

@sureshanaparti sureshanaparti changed the title [WIP] Updated Endpoint Selector to pick the Cluster in Enabled state (in addition to Host state) Updated Endpoint Selector to pick the Cluster in Enabled state (in addition to Host state) May 9, 2025
@sureshanaparti sureshanaparti marked this pull request as ready for review May 9, 2025 08:48
@rohityadavcloud
Copy link
Member

@sureshanaparti @borisstoyanov could you review Wei's remarks:

pod could be disabled as well.
it might be better to check if pod state is checked during resource allocation, etc

And advise if this is ready for merging?

@borisstoyanov
Copy link
Contributor

@rohityadavcloud, Suresh will be syncing the latest fixes with this one, I'll doublecheck and LGTM.

@rohityadavcloud rohityadavcloud marked this pull request as draft May 12, 2025 10:10
sureshanaparti and others added 4 commits May 12, 2025 15:42
- the pool id is persisted while creating the volume, when it fails the pool id is not reverted. On next create volume attempt, CloudStack couldn't find any suitable primary storage even there are pools available with enough capacity as the pool is already assigned to volume which is in Allocated state (and storage pool compatibility check fails). Ensure volume is not assigned to any pool if create volume fails (so the next creation job would pick the suitable pool).
@sureshanaparti
Copy link
Contributor Author

sureshanaparti commented May 12, 2025

code lgtm

pod could be disabled as well. it might be better to check if pod state is checked during resource allocation, etc

@weizhouapache disabled pods are checked during deployment plan, for volumes operations only zone disabled state is checked not pod state. so, there are chances that host in disabled pod (but cluster enabled) can be returned as an endpoint to perform operations.

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13343

@borisstoyanov
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@borisstoyanov a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants